package com.hspud.enum_;

public class EnumExercise02 {
    public static void main(String[] args) {
        System.out.println("===所有星期信息如下===");
        Work[] values = Work.values();
        for (Work work : values){
            System.out.println(work);
        }
    }
}
@SuppressWarnings("all") 
enum Work{
    MONDAY("星期一"),TUESDAY("星期二"),WEDNESDAY("星期三"),
    THURSDAY("星期四"),FRIDAY("星期五"),SATURDAY("星期六"),SUNDAY("星期日");

    private String name;
    private Work(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
    public String getWork(){
        return this.name;
    }

    @Override
    public String toString() {
        return name ;
    }
}